package com.dragon.modules.yuegou.query.product;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.product.GrouponJoinEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 参团表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-09-28 14:32:38
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class GrouponJoinQuery extends GrouponJoinEntity implements Query<GrouponJoinEntity> {

    /** 主键ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 商户ID查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 拼团活动信息ID查询条件 */
	@JsonUnwrapped(prefix = "grouponInfoId")
	private Condition<String> grouponInfoIdCondition;

    /** 团购ID查询条件 */
	@JsonUnwrapped(prefix = "grouponId")
	private Condition<String> grouponIdCondition;

    /** 商品ID查询条件 */
	@JsonUnwrapped(prefix = "skuId")
	private Condition<String> skuIdCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 发起人id查询条件 */
	@JsonUnwrapped(prefix = "owner")
	private Condition<Long> ownerCondition;

    /** 订单号查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

    /** 类型 0拼团 1单独购买查询条件 */
	@JsonUnwrapped(prefix = "joinType")
	private Condition<Boolean> joinTypeCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public GrouponJoinQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public GrouponJoinQuery(GrouponJoinEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public GrouponJoinQuery(GrouponJoinQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.grouponInfoIdCondition != null) {
			this.grouponInfoIdCondition = other.grouponInfoIdCondition.copy();
		}
		if(other.grouponIdCondition != null) {
			this.grouponIdCondition = other.grouponIdCondition.copy();
		}
		if(other.skuIdCondition != null) {
			this.skuIdCondition = other.skuIdCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.ownerCondition != null) {
			this.ownerCondition = other.ownerCondition.copy();
		}
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
		if(other.joinTypeCondition != null) {
			this.joinTypeCondition = other.joinTypeCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<GrouponJoinEntity> toQueryWrapper() {
		QueryWrapper<GrouponJoinEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (grouponInfoIdCondition != null) {
			grouponInfoIdCondition.toWrapper(wrapper, COL_GROUPON_INFO_ID);
		}
		if (grouponIdCondition != null) {
			grouponIdCondition.toWrapper(wrapper, COL_GROUPON_ID);
		}
		if (skuIdCondition != null) {
			skuIdCondition.toWrapper(wrapper, COL_SKU_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (ownerCondition != null) {
			ownerCondition.toWrapper(wrapper, COL_OWNER);
		}
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		if (joinTypeCondition != null) {
			joinTypeCondition.toWrapper(wrapper, COL_JOIN_TYPE);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回主键ID查询条件
	 * 
	 * @return idCondition 主键ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取主键ID查询条件
	 * 
	 * @return idCondition 主键ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置主键ID查询条件
	 * 
	 * @param idCondition 主键ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID查询条件
	 * 
	 * @param merchantIdCondition 商户ID查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回拼团活动信息ID查询条件
	 * 
	 * @return grouponInfoIdCondition 拼团活动信息ID查询条件
	 */
	public Condition<String> grouponInfoId() {
		this.grouponInfoIdCondition = new Condition<>();
		return this.grouponInfoIdCondition;
	}
	
	/**
	 * 获取拼团活动信息ID查询条件
	 * 
	 * @return grouponInfoIdCondition 拼团活动信息ID查询条件
	 */
	public Condition<String> getGrouponInfoIdCondition() {
		return grouponInfoIdCondition;
	}

	/**
	 * 设置拼团活动信息ID查询条件
	 * 
	 * @param grouponInfoIdCondition 拼团活动信息ID查询条件
	 */
	public void setGrouponInfoIdCondition(Condition<String> grouponInfoIdCondition) {
		this.grouponInfoIdCondition = grouponInfoIdCondition;
	}

	/**
	 * 构造并返回团购ID查询条件
	 * 
	 * @return grouponIdCondition 团购ID查询条件
	 */
	public Condition<String> grouponId() {
		this.grouponIdCondition = new Condition<>();
		return this.grouponIdCondition;
	}
	
	/**
	 * 获取团购ID查询条件
	 * 
	 * @return grouponIdCondition 团购ID查询条件
	 */
	public Condition<String> getGrouponIdCondition() {
		return grouponIdCondition;
	}

	/**
	 * 设置团购ID查询条件
	 * 
	 * @param grouponIdCondition 团购ID查询条件
	 */
	public void setGrouponIdCondition(Condition<String> grouponIdCondition) {
		this.grouponIdCondition = grouponIdCondition;
	}

	/**
	 * 构造并返回商品ID查询条件
	 * 
	 * @return skuIdCondition 商品ID查询条件
	 */
	public Condition<String> skuId() {
		this.skuIdCondition = new Condition<>();
		return this.skuIdCondition;
	}
	
	/**
	 * 获取商品ID查询条件
	 * 
	 * @return skuIdCondition 商品ID查询条件
	 */
	public Condition<String> getSkuIdCondition() {
		return skuIdCondition;
	}

	/**
	 * 设置商品ID查询条件
	 * 
	 * @param skuIdCondition 商品ID查询条件
	 */
	public void setSkuIdCondition(Condition<String> skuIdCondition) {
		this.skuIdCondition = skuIdCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回发起人id查询条件
	 * 
	 * @return ownerCondition 发起人id查询条件
	 */
	public Condition<Long> owner() {
		this.ownerCondition = new Condition<>();
		return this.ownerCondition;
	}
	
	/**
	 * 获取发起人id查询条件
	 * 
	 * @return ownerCondition 发起人id查询条件
	 */
	public Condition<Long> getOwnerCondition() {
		return ownerCondition;
	}

	/**
	 * 设置发起人id查询条件
	 * 
	 * @param ownerCondition 发起人id查询条件
	 */
	public void setOwnerCondition(Condition<Long> ownerCondition) {
		this.ownerCondition = ownerCondition;
	}

	/**
	 * 构造并返回订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}
	
	/**
	 * 获取订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置订单号查询条件
	 * 
	 * @param orderNoCondition 订单号查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

	/**
	 * 构造并返回类型 0拼团 1单独购买查询条件
	 * 
	 * @return joinTypeCondition 类型 0拼团 1单独购买查询条件
	 */
	public Condition<Boolean> joinType() {
		this.joinTypeCondition = new Condition<>();
		return this.joinTypeCondition;
	}
	
	/**
	 * 获取类型 0拼团 1单独购买查询条件
	 * 
	 * @return joinTypeCondition 类型 0拼团 1单独购买查询条件
	 */
	public Condition<Boolean> getJoinTypeCondition() {
		return joinTypeCondition;
	}

	/**
	 * 设置类型 0拼团 1单独购买查询条件
	 * 
	 * @param joinTypeCondition 类型 0拼团 1单独购买查询条件
	 */
	public void setJoinTypeCondition(Condition<Boolean> joinTypeCondition) {
		this.joinTypeCondition = joinTypeCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
